package com.kc.business.mapper;

import com.kc.business.domain.KcFreeTicketApply;
import com.kc.business.domain.vo.KcFreeTicketApplyVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * FileName: BizFreeTicketMapper
 * Author:   TP
 * Date:     2020-10-28 14:12
 * Description: 免费票Mapper
 */
@Mapper
public interface BizFreeTicketMapper {

    /**
     * 根据条件查询免票申请信息
     *
     * @param vo 查询VO
     * @return 免票申请信息
     */
    List<KcFreeTicketApply> getList(KcFreeTicketApplyVo vo);

    /**
     * 根据ID集合批量获取免票申请信息
     *
     * @param ids 主键ID集合
     * @return 免票申请信息
     */
    List<KcFreeTicketApply> getByIds(List<Integer> ids);

    KcFreeTicketApply getById(Integer id);

    /**
     * 审核
     *
     * @param ids          免票申请信息ID
     * @param status       状态
     * @param rejectReason 审核信息
     * @return 影响行数
     */
    int auditBatch(@Param("ids") List<Integer> ids,
                   @Param("status") Integer status,
                   @Param("rejectReason") String rejectReason);

    int audit(@Param("id") Integer ids,
              @Param("status") Integer status,
              @Param("rejectReason") String rejectReason);
}
